define(['jquery'],() =>{
    class  Footer {
        constructor (){
            this.load().then(()=>{
                this.returnHeader()


            }) 
          

        }
        // 犯的错是LOAD是加载过后的为异步，所以要用promise来实现
            load (){
                return new Promise( resolve =>{
                    $('footer').load('/html/modules/footer.html',resolve)
                })   
            }
        

        returnHeader(){
            $('.foot-btn-box').on('click',()=>{
               $(window).scrollTop(0)
            })


        }

    }



    return new Footer()

});